﻿// --------------------------------------------------------------------------------------
// <copyright file="BaseDAO.cs" company="NGroup">
// Copyright (c) NGroup. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------
// <history>
//     <change who="Bui Thanh Nam" date="2013.12.15">Create</change>
// </history>
// --------------------------------------------------------------------------------------

namespace NGroup.VTL.DAL
{
    using System.Configuration;
    using System.Data.SqlClient;

    public class BaseDAO
    {
        private static string _connectionString;

        static BaseDAO()
        {
            var settingConn = ConfigurationManager.ConnectionStrings["VTL.DB"];

            if (settingConn != null)
            {
                _connectionString = settingConn.ConnectionString;
            }
            else
            {
                _connectionString = string.Empty;
            }
        }

        public static SqlConnection GetConnectionString()
        {
            SqlConnection sqlConnection = new SqlConnection(_connectionString);

            return sqlConnection;
        }
    }
}
